package com.oocl.im.outputstream.impl;

import com.oocl.im.outputstream.IOutputstream;

import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 * Created by LIBA2 on 7/13/2017.
 */
public class NetOutput implements IOutputstream{

    ObjectOutputStream oos;

    public NetOutput(ObjectOutputStream oos) {
        this.oos = oos;
    }

    public ObjectOutputStream getOos() {
        return oos;
    }

    public void setOos(ObjectOutputStream oos) {
        this.oos = oos;
    }



    @Override
    public void write(Object object) {
        try {
            oos.writeObject(object);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


}
